﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace kairiseiMAParser
{
    public class Skill
    {
        public string id;//#ID
        public string name;//メイン名
        public string sub_name;//サブ名
        public string explan;//説明
        public int skill_info_param_no;//スキル効果値表示パラメータ番号
        public EXTEND extend = new EXTEND();//機能
        public string skill_info_param_show_type;
        public string skill_voice_no;
        public string type;//分类
        public string kind;//种类
        public string attr;//属性
        public string job_type;//ジョブタイプ
        public string physics_type;//物理or魔法
        public int cost;//コスト
        public int pve_priority;//優先度
        public int pvp_priority;//優先度
        public string rank_point;//スキルランク
        public int hate_rate;//ヘイト倍率
        public string target;//ターゲット
        public int chainrate;//属性デッキコンボ

        public class EXTEND
        {
            public string order;//発動条件
            public string[] order_params = new string[5];//パラメータ1~5
            public int priority;//優先度
            public int skill_value_role_no;//スキル効果値表示機能番号
            public int roleid;//機能ID
        }

        public Skill(string[] str)
        {
            Reader reader = new Reader(str);
            id = reader.NextString();
            name = reader.NextString();
            sub_name = reader.NextString();
            explan = reader.NextString();
            skill_info_param_no = reader.NextInt32();
            extend.skill_value_role_no = reader.NextInt32();
            skill_info_param_show_type = reader.NextString();
            skill_voice_no = reader.NextString();
            type = reader.NextString();
            kind = reader.NextString();
            attr = reader.NextString();
            job_type = reader.NextString();
            physics_type = reader.NextString();
            cost = reader.NextInt32();
            pve_priority = reader.NextInt32();
            pvp_priority = reader.NextInt32();
            rank_point = reader.NextString();
            hate_rate = reader.NextInt32();
            target = reader.NextString();
            chainrate = reader.NextInt32();
            extend.order = reader.NextString();
            for (int i = 0; i < 5; i++)
            {
                extend.order_params[i] = reader.NextString();
            }
            extend.priority = reader.NextInt32();
            extend.roleid = reader.NextInt32();
        }
    }
}
